package application.visual;

import javax.swing.tree.DefaultMutableTreeNode;

public class FileSearchTreeNode extends DefaultMutableTreeNode{

	private boolean isDirectory = false;
	public FileSearchTreeNode(String localDir, boolean isDirectory)
	{
		super(localDir);
		this.isDirectory = isDirectory;
		
	}
	
	
	public String getFullPath()
	{
		Object[] fullPath = getUserObjectPath();
		
		String path = "";
		for(Object o : fullPath)
			path += String.valueOf(o) + "/";
		
		if(!isDirectory)
		{
			path = path.substring(0, path.length() -1);
		}
		
		return path;
	}
}
